<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<c:set var="requestURI" value="${pageContext.request.requestURI}" />
<c:set var="isLogin" value="${fn:contains(requestURI, '/login/')}" />
<c:set var="isEvents" value="${fn:contains(requestURI, '/events/')}" />
<c:set var="isPeople" value="${fn:contains(requestURI, '/people/')}" />
<c:set var="isGroups" value="${fn:contains(requestURI, '/groups/')}" />
<c:set var="isMembers" value="${fn:contains(requestURI, '/members/')}" />    
<c:set var="isApplications" value="${fn:contains(requestURI, '/applications/')}" />    
<c:set var="isAuthority" value="${fn:contains(requestURI, '/authority/')}" />    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>SpringBird - <decorator:title /></title>
<link rel="stylesheet" type="text/css" href="${contextPath}/assets/styles.css" />
</head>
<body> 

<div class="header">
  <h1>SpringBird Administrator</h1>
</div>

<c:if test="${!isLogin}">
<div class="tabs">
  <a ${isEvents ? 'class="s"' : ''} href='${contextPath}/events/Listing.action'>이벤트들</a>
  <a ${isPeople ? 'class="s"' : ''} href='${contextPath}/people/Listing.action'>인간들</a>
  <a ${isGroups ? 'class="s"' : ''} href='${contextPath}/groups/Listing.action'>그룹</a>  
  <a ${isMembers ? 'class="s"' : ''} href='${contextPath}/members/Listing.action'>회원</a>
  <a ${isApplications ? 'class="s"' : ''} href='${contextPath}/applications/Listing.action'>프로그램</a>
  <a ${isAuthority ? 'class="s"' : ''} href='${contextPath}/authority/Listing.action'>권한</a>
</div>
<div class="tabs-under-bg"></div>
<div class="tabs-under">
  <c:if test="${isEvents}">
    <a href="Listing.action">이벤트 리스트</a>
    |<a href="New.action">새로운 이벤트</a>
  </c:if>
  <c:if test="${isPeople}">
    <a href="Listing.action">인간 리스트</a>
    |<a href="New.action">새로운 인간</a>
  </c:if>
  <c:if test="${isGroups}">
    <a href="Listing.action">그룹 목록</a>
  </c:if>    
  <c:if test="${isMembers}">
    <a href="Listing.action">회원 목록</a>
    |<a href="New.action">새로운 회원 등록</a>
  </c:if>  
  <c:if test="${isApplications}">
    <a href="Listing.action">프로그램 목록</a>
    |<a href="New.action">새로운 프로그램 등록</a>
  </c:if>  
  <c:if test="${isAuthority}">
    <a href="Listing.action">권한 목록</a>
    |<a href="New.action">새로운 권한 등록</a>
  </c:if>      
</div>
</c:if>
<div class="bodyhead">
  <h2><decorator:title /></h2>
</div>
<div class="body">
<decorator:body />
</div>

</body>
</html>